Pyshark — библиотека для анализа сетевого трафика на Python. Она позволяет работать с .pcap-файлами и захватывать трафик в реальном времени. Для работы нужно установить tshark (идёт вместе с Wireshark) и добавить его в PATH.
Пример анализа файла:
import pyshark
cap = pyshark.FileCapture('example.pcap') for packet in cap: print(packet)
Пример захвата в реальном времени:
live_cap = pyshark.LiveCapture(interface='eth0') for packet in live_cap.sniff_continuously(packet_count=10): print(packet)
Чтобы фильтровать данные, можно использовать дисплейные фильтры Wireshark:
cap = pyshark.FileCapture('example.pcap', display_filter='http') for packet in cap: print(packet.http.host)
Pyshark — библиотека для анализа сетевого трафика на Python. Она позволяет работать с .pcap-файлами и захватывать трафик в реальном времени. Для работы нужно установить tshark (идёт вместе с Wireshark) и добавить его в PATH.
Пример анализа файла:
import pyshark
cap = pyshark.FileCapture('example.pcap') for packet in cap: print(packet)
Пример захвата в реальном времени:
live_cap = pyshark.LiveCapture(interface='eth0') for packet in live_cap.sniff_continuously(packet_count=10): print(packet)
Чтобы фильтровать данные, можно использовать дисплейные фильтры Wireshark:
cap = pyshark.FileCapture('example.pcap', display_filter='http') for packet in cap: print(packet.http.host)
To pay the bills, Mr. Durov is issuing investors $1 billion to $1.5 billion of company debt, with the promise of discounted equity if the company eventually goes public, the people briefed on the plans said. He has also announced plans to start selling ads in public Telegram channels as soon as later this year, as well as offering other premium services for businesses and users.
Telegram announces Search Filters
With the help of the Search Filters option, users can now filter search results by type. They can do that by using the new tabs: Media, Links, Files and others. Searches can be done based on the particular time period like by typing in the date or even “Yesterday”. If users type in the name of a person, group, channel or bot, an extra filter will be applied to the searches.
Python Turbo Уютное сообщество Python разработчиков from no